package fr.oz.mobile.home 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.text.TextField;
	import fr.digitas.flowearth.text.styles.styleManager;
	/**
	 * ...
	 * @author Fazermokeur
	 */
	public class HomeNavItem extends Sprite
	{
		
		private var label:TextField;
		private var _id:String;
		
		public function HomeNavItem(id:String, value:String) 
		{
			_id = id;
			label = new TextField();
			styleManager.apply(label, ".home_labels", value);
			addChild(label);
			
			mouseChildren = false;
			
			addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			label.x = ((stage.stageWidth - label.width) >> 1) >> 0;
		}
		
		public function get id():String { return _id; }
		
	}

}